<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>React Demo</title>
  <style>
    .greet {
      color: red;
    }
  </style>
</head>

<body>
  <div id="root"></div>
</body>
<script src="/react-dom.development.js/umd/react.development.js"></script>
<script src="/react-dom.development.js/umd/react-dom.development.js"></script>
<script src="/babel-standalone@6.26.0/babel.js"></script>
<script type="text/babel">
  function greet(name) {
    return `你好， ${name}`
  }

  function render() {
    ReactDOM.render(
      <div>
        <h1 className="greet">{greet('ataola')}</h1>
        <h2>北京时间：{new Date().toLocaleTimeString()}</h2>
      </div>,
      document.getElementById('root')
    );
  }

  setInterval(render, 1000)
</script>

</html>